<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
   <title>FishVideo</title>
   <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
   <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
   <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
   <style>
    #footer{
			width:100%;
			text-align:center;
	   }
   </style>
</head>
<body>
	<?php 
		require_once("daohangmenu.php");
		require_once("../utils/db.php");
	    $conn=connect();
	    $realpath="upload/";
	?>
	<?php
		
		if(isset($_POST['search'])){//进行搜索
			$sql="select * from fishvideo_video where yjl_videoname like '%{$_POST['videoname']}%'";
		}else{
			$sql="select * from fishvideo_video where yjl_tid='{$_GET['tid']}'";
		}		
			$result=mysql_query($sql);
			if($result){

			}
			$i=-1;
			if(!mysql_num_rows($result)){//无结果
				echo "不好意思，没有查到该影片！";
			}
			echo "<div class='row'>";
			
			while($row=mysql_fetch_array($result)){
				$i++;
				if($i==4){ echo "</div><div class='row'>";};
				echo "
				<div class='col-sm-3 col-md-3'>
				  <div  class='thumbnail' onClick='window.location.href='#''
				  style='cursor:pointer;'>'
				  	 <img src='{$realpath}{$row['yjl_pic']}' href='#'
					 alt='通用的占位符缩略图'>
					 <div class='caption'>
						<h3>{$row['yjl_videoname']}</h3>
						<a href='videodet.php?vid={$row['yjl_vid']}'>{$row['yjl_lintro']}</a>
					 </div>
				  </div>
			   </div>";
			  
			}
			echo "</div>";
			mysql_close($conn);
	?>
	<hr>
	<div id="footer">
	<p>Copyright © 2016-2017 FishVideo.com All Rights Reserved</p>
	<p>站长邮箱:574153393@qq.com</p>
	</div>
</body>
</html>